/**
 * @file xgame_matrix.h
 *
 */

#ifndef XGAME_MATRIX
#define XGAME_MATRIX

#ifdef __cplusplus
extern "C" {
#endif

/*********************
 *      INCLUDES
 *********************/
#include <stdint.h>

/*********************
 *      DEFINES
 *********************/

/**********************
 *      TYPEDEFS
 **********************/

/**********************
 * GLOBAL PROTOTYPES
 **********************/

 /**
 * copy matrix (from top to bottom) columns, to array (from left to right)
 * @param left     array from left to right
 * @param top      Starting position of column (from top to bottom)
 * @param row      The number of rows in a matrix
 * @param col      The number of columns in a matrix
 * @return         void
 */
void matrix_cpy_t2l(uint16_t *left, const uint16_t *top, uint16_t row, uint16_t col);

 /**
 * copy array (from left to right), to matrix (from top to bottom) columns
 * @param top      Starting position of column (from top to bottom)
 * @param left     array from left to right
 * @param row      The number of rows in a matrix
 * @param col      The number of columns in a matrix
 * @return         void
 */
void matrix_cpy_l2t(uint16_t *top, const uint16_t *left, uint16_t row, uint16_t col);

 /**
 * copy matrix (from bottom to top) columns, to array (from left to right)
 * @param left     array from left to right
 * @param bottom   Starting position of column (from bottom to top)
 * @param row      The number of rows in a matrix
 * @param col      The number of columns in a matrix
 * @return         void
 */
void matrix_cpy_b2l(uint16_t *left, const uint16_t *bottom, uint16_t row, uint16_t col);

 /**
 * copy  array (from left to right) to matrix (from bottom to top) columns
 * @param bottom   Starting position of column (from bottom to top)
 * @param left     array from left to right
 * @param row      The number of rows in a matrix
 * @param col      The number of columns in a matrix
 * @return         void
 */
void matrix_cpy_l2b(uint16_t *bottom, const uint16_t *left, uint16_t row, uint16_t col);

/**********************
 *      MACROS
 **********************/


#ifdef __cplusplus
} /*extern "C"*/
#endif

#endif /*XGAME_MATRIX*/
